import request from '@/request'

export type UserInfo = {
  nickName: string
  username: string
  phoneNumber: string
}

enum URL {
  LOGIN = 'user/login',
  INFO = 'user/info'
}

export const loginUser = (data: any) => request.post(URL.LOGIN, data) // 登录接口
export const getUserInfo = () => request.get<UserInfo>(URL.INFO) // 获取用户信息接口
